var mongoose = require('mongoose');
module.exports = {
  qiniu: {
    ACCESS_KEY: 'p1dl8jAdA5H9f99AcL7NuT0GPG5YU-YU5ULtqDrb',
    SECRET_KEY: 'YosKeS0-SmmilIDDE5tHtvBF4f_GuMPsgkYpIPAF',
    Bucket_Name: 'shengxuejiedu',
    Port: 19110,
    Domain: 'http://course.shengxuejiedu.com'
  },
  connect:function(){
    mongoose.Promise = require('bluebird');
    mongoose.connect('mongodb://127.0.0.1/toupiao',{useMongoClient: true});
    
    var db = mongoose.connection;
    db.on('error', console.error.bind(console, 'connection error:'));
    db.once('open', function() {
      // we're connected!
        console.log('Succcess! mongodb');
    });
  }
};

